package top.xzhanyao.yowshare.dashboard.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import top.xzhanyao.yowshare.dashboard.entity.User;
import top.xzhanyao.yowshare.dashboard.mapper.UserMapper;
import top.xzhanyao.yowshare.dashboard.service.UserService;

/**
 * <p>
 * 用户 服务实现类
 * </p>
 *
 * @author zhanyao
 * @since 2018-07-13
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {

    @Override
    public User selectByUsername(String username) {
        QueryWrapper queryWrapper = new QueryWrapper();
        queryWrapper.eq("username", username);
        return baseMapper.selectOne(queryWrapper);
    }

}
